function myRegExp(type,str){
    var obj = {
        "pass":/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{6,20}$/,
        "phone": /^1\d{10}$/,
    };
    return obj[type].test(str);
}
